import { Controller, Get, HttpCode, Post } from '@nestjs/common';
import { MockService } from './mock.service';
import { ApiTags } from '@nestjs/swagger';

@ApiTags('mock模块')
@Controller('mock')
export class MockController {
  constructor(private readonly mockService: MockService) {}

  @Post('login')
  @HttpCode(200)
  login() {
    return this.mockService.login().data;
  }

  @Get('getInfo')
  getInfo() {
    return this.mockService.getInfo().data;
  }

  @Get('listSearch')
  listSearch() {
    return this.mockService.listSearch().data;
  }

  @Post('logout')
  @HttpCode(200)
  logout() {
    return this.mockService.logout().data;
  }
}
